from ui.addBook import *
from service import *

class AddBookMainWindow(Ui_AddBookMainWindow, QtWidgets.QMainWindow):
    def __init__(self) -> None:
        super().__init__()
        self.setupUi(self)
        self.pushButton.clicked.connect(self.addBook)


    def addBook(self):
        bs = BookService()
        title = self.lineEdit.text()
        isbn = self.lineEdit_2.text()
        author = self.lineEdit_3.text()
        count = self.lineEdit_4.text()
        bs.addBook(title, isbn, author, int(count))
        self.close
